﻿$(start);

function start() {
	var locaObj = Make();
	if(locaObj) {
		var userId=locaObj.userId;
		var dt=locaObj.dt;
		var md5Code=locaObj.md5Code;
		verify(userId, dt, md5Code);

	} else {

		alert('信息缺失!!')
	}
}


function verify(userId, dt, md5Code) {
	var url = 'service/tagerOp.ashx';
	var data = {
		op:'verify',
		userId:userId,
		dt: dt,
		md5Code: md5Code
	};
	var callback = function(data) {
		console.log(data);

	};

	$.post(url, data, callback);
}

function Make() {
	var rst = null;
	var str = location.search;
	var index = str.indexOf('?');
	if(index != -1) {
		rst = {};
		str = location.search.substring(index + 1);
		var arr = str.split('&');
		for(var i = 0; i < arr.length; i++) {
			var arr2 = arr[i].split('=');
			rst[arr2[0]] = arr2[1];
		}


	}
	return rst;
}